= header_tag('库存详细')

.row
  .form-horizontal
    .form-group
      = label_tag :status, '终端名称', class: 'control-label col-md-2'
      %p.form-control-static
        = @machine_grid.machine.name
    .form-group
      = label_tag :status, '终端编码', class: 'control-label col-md-2'
      %p.form-control-static
        = @machine_grid.machine.code
    .form-group
      = label_tag :status, '格子名称', class: 'control-label col-md-2'
      %p.form-control-static
        = @machine_grid.grid.name
    .form-group
      = label_tag :status, '格子编码', class: 'control-label col-md-2'
      %p.form-control-static
        = @machine_grid.grid.code
    .form-group
      = label_tag :status, '商品名称', class: 'control-label col-md-2'
      %p.form-control-static
        = @machine_grid.product.name
    .form-group
      = label_tag :status, '商品价格', class: 'control-label col-md-2'
      %p.form-control-static
        = @machine_grid.product.price
    .form-group
      = label_tag :avatar, '照片', class: 'control-label col-md-2'
      %p.form-control-static
        = image_tag("#{@machine_grid.product.try(:image_url) || 'avatar.png' }", id: 'doctor_image', style: 'width: 400px; height: 400px;display: block;cursor: pointer;')
    .form-group
      = label_tag :status, '状态', class: 'control-label col-md-2'
      %p.form-control-static
        = @machine_grid.status_text

= link_to '编辑', edit_cpanel_machine_grid_path(@machine_grid), class: "btn btn-outline btn-primary"
\|
= link_to '终端格子列表', cpanel_machine_grids_path, class: "btn btn-outline btn-primary"
